import java.util.Scanner;

public class Solution {
    public boolean isPalindrome(String s){
        StringBuffer str1 = new StringBuffer();
        int len = s.length();
        for (int i = 0; i < len; i++) {
            char ch = s.charAt(i);
            if(Character.isLetterOrDigit(ch)){
                str1.append(Character.toLowerCase(ch));
            }
        }
        StringBuffer str2 = new StringBuffer(str1.toString()).reverse();
        return str1.toString().equals(str2.toString());
    }
    public static void main(String[] args) {
        Scanner string = new Scanner(System.in);
        while (string.hasNextLine()){
            String str1 = string.nextLine();
            Solution solution = new Solution();
            System.out.println(solution.isPalindrome(str1));
        }
    }
}
